class Lunbo {
    constructor() {
        this.init();
    }
}
$.extend(Lunbo.prototype, {
    init: function () {
        this.index = 0;
        this.dmprev = $(".danmaiPrev");
        this.dmnext = $(".danmaiNext");
        this.danmaiWrap = $(".danmaiWrap")
        this.dmnext.on("click", this.toNextWrap.bind(this))
        this.dmprev.on("click",this.toPrevWrap.bind(this))
    },
    toNextWrap:function(){
        this.index++;
        if(this.index==1){
            this.danmaiWrap.attr({style:"transition-duration: 300ms; transform: translate3d(-348px, 0px, 0px);"})
            this.dmprev.removeClass("swiper-button-disabled")
            this.dmnext.addClass("swiper-button-disabled")
        }
    },
    toPrevWrap:function(){
        this.index--;
        if(this.index==0){
            this.dmnext.removeClass("swiper-button-disabled")
            this.dmprev.addClass("swiper-button-disabled")
            this.danmaiWrap.attr({style:"transition-duration: 300ms; transform: translate3d(0px, 0px, 0px);"})
        }
    }
})
var lunbo = new Lunbo();
export {lunbo}